<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<table>
<?php
    require_once "manager/simplehtmldom/simple_html_dom.php";
    // Create DOM from URL or file
    $url = "http://doisong.vnexpress.net/tin-tuc/gioi-tinh/";
    $html = file_get_html($url);
    foreach($html->find('#news_home li') as $first_element){
        $title_news = $first_element->find('.title_news .txt_link');
        foreach($title_news as $news){
            $title = $news->plaintext;
        }
        $thumbs = $first_element->find('.block_image_news .thumb .txt_link img');
        foreach($thumbs as $thumb){
            $src = $thumb->src;
        }
        $tomtats = $first_element->find('.block_image_news .news_lead');
        foreach($tomtats as $tomtat){
            $ngangon = $tomtat->plaintext;
        }
        
        ?>
        <tr>
            <td>
                <h1><?php echo $title; ?></h1>
                <p>
                    <img src="<?php echo $src; ?>" />
                </p>
                <p>
                    <?php echo $ngangon; ?>
                </p>
            </td>
        </tr>        
        <?php
    }
?>
</table>